session=$1
tmux has-session -t $session
if [ $? != 0 ]
then
     tmux new-session -s $session -n News! -d "sleep 1 && mutt -y"
     tmux split-window -t "$session:0.0" -v -p 50 "sleep 1 && $SHELL /home/jan/.local/share/applications/script-bin/helperscripts/calendar.sh"
     tmux split-window -t "$session:0.1" -h -p 15 "sleep 1 && $SHELL /home/jan/.local/share/applications/script-bin/helperscripts/offlineimap_run.sh 1"
     tmux attach -t $session
else
     echo 'SESSION ALREADY EXISTS'
fi
